package dailearn.feign.producer;

import dailearn.feign.config.SpringFormEncoderConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 *
 * @author daify
 * @date 2019-07-09 10:26
 **/
@Service
@FeignClient(name = "base-producer-upload",configuration = SpringFormEncoderConfig.class)
public interface ClientService {

    @RequestMapping(value = "/upload", method = RequestMethod.POST,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String handleFileUpload(@RequestPart(value = "file") MultipartFile file) ;
}
